/**
 * VUEshop
 * ============================================================================
 * * 版权所有 2015-2027 深圳搜豹网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.vueshop.com.cn
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和使用 .
 * 不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
 * $Author: 沈小白 2020-07-22 $
 */<template> 
	<view v-if="storeList">
		<form>
			<view class="container">
				<view @tap="enterAddressPage" class="user-mes">
					<view class="user-contact">{{addressList.consignee}} {{addressList.mobile}}</view>
					<view class="location">
						<view class="address">{{addressList.province_name}}{{addressList.city_name}}{{addressList.district_name}}{{addressList.address}}</view>
						<view class="pos-icon"></view>
					</view>
					<view class="border-img">
						<image class="wh100" :src="imgUrl+'common/tt.png'"role="img"> </image>
						 </view> 
					<view class="update-logistics">
						
					</view>
				</view>
				<view class="order-meg" v-if="storeList">
					<view class="store-list" v-for="(item1,index) in storeList" :key="index">
						<view class="store_name">
							<image :src="imgUrl+'cart/carnew.png'" role="img"></image>
							{{item1.store_name}}
						</view>
						<view class="order-detail" v-for="(item,ind) in item1.cart_list" :key="ind">
							<view class="goods-img">
								<image class="wh100" :src="hostUrl+'/mall/goods/thumb_image?goods_id='+ item.goods_id+'&width='+goodsImgWidth+'&height='+goodsImgHeight+'&'+item.goods_id+'.'+imgType"
								 role="img">
								</image>
							</view>
							<navigator class="order-cont" :url="'/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id" role="navigation">
								<view class="goods-name ellipsis-2">{{item.goods_name}}</view>
								<view class="goods-color ellipsis-1">{{item.spec_key_name}}</view>
							</navigator>
							<view class="information1">{{item1.qitian==1?'支持七天无理由退货':'不支持七天无理由退货'}}</view>

							<view class="order-num">
								<view class="co-red">
									<text class="goods_price">
										￥
									</text>
									{{item.goods_price}}
									<view class="goods_num">
										<text>
											x
										</text>
										{{item.goods_num}}
									</view>
								</view>
							</view>
						</view>
						<view class="distribution">配送方式</view>
						<view class="set-mes">
							<view class="use-item selfsubmit">
								<radio-group bindchange="radioChange" class="radio-group" role="radiogroup">
									
									<block v-for="(item,ind) in items" :key="ind">
										<label class="radio" role="radio" aria-disabled="false" aria-checked="true">
											<view>
												<text style="margin-top:5px;display:inline-block;">
													{{item.name}}
												</text>
												<radio aria-checked="true" color="#ff3636"  :checked="item.checked"  role="radio" aria-disabled="false">
												</radio>
											</view>
										</label>
										<view class="selfsubmit-view line">
											<text>
												{{item.value}}
											</text>
										</view>
									</block>
									
									
								</radio-group>
							</view>
							<!-- 暂时不做 -->
							<!-- <view class="use-item set-item line" >
								<view>自提时间</view>
								<view catchtap="showdate" style="width:188px;">
									<text>
										2019-12-28 14:25 【星期六】
									</text>
									<image class="arrow-rigth" :src="imgUrl+'common/icon-arrowdown2.png'" role="img"></image>
								</view>
							</view>
							<view catchtap="getSubmitAddress" class="use-item set-item line">
								<view>自提地点</view>
								<text style="padding-right:20px">
									速度v从
								</text>
								<image class="arrow-rigth" :src="imgUrl+'common/icon-arrowdown2.png'" role="img"></image>
							</view> -->
							<view @tap="useCoupon" class="set-item line" :data-idx="index"  v-if="orderList">
								<view class="coupon">
									<view>优惠券</view>
									<view v-if="orderList.length>0" class="coupon-num">
									
										{{storeList[index].usable_coupons.length>0?storeList[index].usable_coupons.length:'0'}}张可用
									</view>
									
								</view>
								<view class="set-btn" v-if="storeList.length>0">
									<view v-if="storeList[index].usable_coupons.length>0">{{user_coupon_name?user_coupon_name:'未使用'}}</view>
									<view v-else>无可用</view>
								
									<image class="arrow-rigth" :src="imgUrl+'common/icon-arrowdown2.png'" role="img"> </image>
								</view>
							</view>
							<view @tap="showInvoice" class="set-item line" :data-idx="index">
								<view class="coupon">
									<view>发票信息</view>
								</view>
								<view class="set-btn">
									<view>{{text}}</view>
									<image class="arrow-rigth" :src="imgUrl+'common/icon-arrowdown2.png'" role="img"> </image>
								</view>
							</view>
							<view class="set-item">
								<view>备注</view>
								<textarea @input="keyUpChangeNum" :data-idx="index" class="word-box" maxlength="30" name="user_note2" placeholder="选填：对本次交易的说明"
								 placeholder-style="color:#999;">

														</textarea>
							</view>
						</view>
					</view>
				</view>
				<view class="set-mes">
					<view class="use-item line">
						<view>使用积分</view>
						<view class="jf">可用积分：{{userInfo.pay_points}}({{config.shopping_point_rate}}积分兑换1元)</view>
						
						<block >
							<image @tap="usePoints" class="use-points" :src="imgUrl+'common/ischeck.png'"  v-if="select" ></image>
							<image @tap="usePoints" class="use-points" :src="imgUrl+'cart/nocheck.png'"   role="img" v-if="!select"></image>
						</block>
						
					</view>
					<view @tap="couponsShow" class="use-item">
						<view>优惠劵码</view>
						<image class="arrow-rigth" :src="imgUrl+'common/icon-arrowdown2.png'" role="img"> </image>
					</view>
					<view class="use-item" v-if="payModel">
						<view>支付密码 : </view>
						<input maxlength="6" @input="paypoints" name="paypwd" type="number"  placeholder="请输入密码">

						</input>
					</view>
				</view>
				<!-- 价格栏 -->
				<view class="information" v-if="order">
					<view class="item">
						<view>商品总额</view>
						<view class="co-red">￥{{order.goods_price}}元</view>
					</view>
					<view class="item">
						<view>配送费用</view>
						<view class="co-red" v-if="order.shipping_price>0">{{order.shipping_price}}元</view>
						<view class="co-red" v-if="!order.shipping_price>0">包邮</view>
					</view>
					<view class="item" v-if="order.coupon_price>0">
						<view>使用优惠劵</view>
						<view class="co-red">-￥ {{order.coupon_price}}元</view>
					</view>
					<view class="item" v-if="order.order_prom_amount>0">
						<view>优惠活动</view>
						<view class="co-red">-￥ {{order.order_prom_amount}}元</view>
					</view>
					<view class="item" v-if="order.integral>0">
						<view>使用积分</view>
						<view class="co-red">-￥ {{order.integral_money}}元</view>
					</view>
					
					
				</view>
				<view class="btn-wrap" v-if="order">
					<button class="tips-btn" @tap="submitForm" form-type="submit" id="submitOrder" role="button" aria-disabled="false">
						提交订单

					</button>
					<view class="pay-amount">
						<view class="payable">合计：</view>
						<view class="co-red">￥{{order.order_amount}}元</view>
					</view>
					<view class="num">共 {{order.goods_num}} 件商品</view>
				</view>
			</view>
			<view class="show1 coupons" @tap.once="close_coupons" v-if="show1">
				<view>
					<view class="use">
						优惠券码
						<view @tap="close_coupons">
							<image :src="imgUrl+'common/close.png'" role="img"></image>
						</view>
					</view>
					<view class="input">
						输入优惠券码 :
						<input @input="inputCouponCode">
						</input>
					</view>
					<button @tap="addCouponCode" role="button" aria-disabled="false">确定</button>
				</view>
			</view>
		</form>
	</view>
</template>

<script>
	import {
		getCartOrder,
		getUserAddress,
		getAddressOne,
		getCartList,
		getInvoice,
		postCoupon,
		postCartOrder,
		getUserInfo
	} from "@/api/api.js";
	import common from "@/common/common.js";
	import config from "@/api/config.js";
	import {mapState,mapMutations} from "vuex";
	import Md from "md5";
	export default {
		data() {
			return {
				payModel:false,
				imgUrl:config.imgUrl,
				hostUrl: config.host,
				addressList: "", //地址
				show1:false,//优惠劵码
				userInfo:"",//用户信息
				orderList:"", //订单
				order:"",//总订单
				storeList: "", //商品list
				use_coupon:"",//正在使用的优惠券
				user_coupon_name:"",
				select:false,//使用积分
				couponCode:"",//优惠劵码
				text:"不开发票",
				paypwd:null,//积分支付密码
				coupons:"",//传过去的参数
				coupon_ids:"",//优惠券id 组 字符串类型
				invoiceFlag:false,//发票开关
				firstEnter:true,//第一次进入页面
				AddressPage:true,
				items:[{
					name:"快速配送",
					value:"工作日、双休日与节假日均可送货",
					checked: "true",
				}],
				
				params:{
					"goods_id":"",
					"item_id":"",
					"goods_num":"",
					"address_id":"",
					"order_use_coupon_ids":"", //优惠劵id
					"integral":"",//使用积分
					"user_notes":"",//备注
				},
				options:"",//路由传值信息
				route:"",//路由信息
			};
		},
		computed: {
			...mapState(['config','imgType','goodsImgHeight','goodsImgWidth']),
		},
		onLoad(options) {
			console.log(options)
			this.options=options;
			// 获取当前页面的前一页面的路由
			/*根据options是否有传值  判断是从购物车还是立即购买进来
			*/
				if(options.goods_id){
					let params={
						"goods_id":this.options.goods_id,
						"goods_num":this.options.goods_num,
						"item_id":this.options.item_id
					} 
					this.params.goods_id=this.options.goods_id
					this.params.goods_num=this.options.goods_num
					this.params.item_id=this.options.item_id
				
					this.getCartList(params)
					console.log("详情页进入")
				}else if(!options.goods_id){
				 console.log(options)
				let params = {
					"selected": 1
				} 
				this.getCartList(params)
				console.log("购物车进入")
			 }else if(this.route=="undefined"){
				 console.log(3)
				 uni.navigateTo({
				 	url:'/pages/goods/goodsInfo/goodsInfo'
				 })
			 }
			
			/*获取订单*/ 
			
			// this.getCartList(params)	
			
		},
		onShow() {
			let addressId = uni.getStorageSync("addressInfo");
			let coupon=uni.getStorageSync("userCoupon");
			if(this.AddressPage){
				this.AddressPage=false;
				if (addressId) {
					this._getAddressOne(addressId)
				} else {
					/*获取用户地址*/
					this._getUserAddress()
				}
			}else if(!this.firstEnter){
					if(coupon){
						let store=this.orderList
						let coupon_idsArr=[];
						
						console.log(coupon)
						this.coupons=coupon;
						console.log(store[0])
						store.forEach((i,index)=>{
							// console.log(i)
							// coupon_idsArr.length=0
							//本店铺优惠券
							console.log(coupon.coupon_list_id)
							if(i.store_id==coupon.store_id){
								console.log(index)
								if(coupon.coupon_list_id){
									coupon_idsArr.splice(index,0,coupon.coupon_list_id)
								}
								
								
							}
							//通用优惠劵
							if(coupon.store_id==0){
								if(coupon.coupon_list_id){
									coupon_idsArr.splice(index,0,coupon.coupon_list_id)
								}
								
							}
							
							
						})
						console.log(coupon_idsArr)
						this.params.order_use_coupon_ids=coupon_idsArr;
						console.log(coupon_idsArr)
						
						this._getCartOrder(this.params)
						this.orderList=store
						
						
					}
					if(this.invoiceFlag){
						this.getInvoice()
					}
					
					
				}
			this.firstEnter=false
				console.log(this.orderList)
		},
		methods: {
			// ...mapMutations(['updateUserCouponList']),
			/*商品信息*/
			getCartList(params) {
				getCartList(params).then(res => {
					console.log(res)
					this.storeList = res.store_cart_list;
					this.getUserInfo()
				})
			},
			/*获取订单*/
			_getCartOrder(params) {
				getCartOrder(params).then(res => {
					if (res.msg == "请选择收货地址") {
						common.toast("none", "请选择收货地址!", 2000)
					}
					console.log(res)
					if(res.msg=="没有配置运费模板"){
						common.model("没有配置运费模板",true)
						return
					}
					if(res){
						res.order_list.forEach((i,index)=>{
							i.use_couponId=""
							
							
						})
					}
					
					var that=this;
					if(res.order_use_coupon_ids){
						// console.log(this.coupons)
						this.params.order_use_coupon_ids=res.order_use_coupon_ids
						res.use_couponName=this.coupons.name
					}
					
					this.user_coupon_name=res.use_couponName
					this.order=res;
					res.order_list.map(item=>{ //排序
						this.storeList.map(i=>{
							if(item.store_id==i.store_id){
								i.usable_coupons=item.usable_coupons
							}
						})
					})
					this.orderList = res.order_list;
				})
			},
			
			/*获取用户地址*/
			_getUserAddress() {
				getUserAddress().then(res => {
					// console.log(res)
					if (res.length > 0) {
						this.addressList = res[0]
						/*获取订单*/
						let addressId = this.addressList.address_id;
						this.params.address_id=addressId;
						
						this._getCartOrder(this.params)
					} else {
						this.enterAddressPage()
					}

				})
			},
			//发票信息
			getInvoice(){
				getInvoice().then(res=>{
				console.log(res);
				if(res!=""){
					this.text=`纸质(${res.invoice_title}-${res.invoice_desc})`
				}
				})
			},
			/*选择单个地址*/
			_getAddressOne(addressId) {
				getAddressOne(addressId).then(res => {
					// console.log(res)
					this.addressList = res;
					let addressId = this.addressList.address_id
					this.params.address_id=addressId;
					
					this._getCartOrder(this.params)
				})
			},
			/*选中地址*/ 
			enterAddressPage() {
				this.AddressPage=true;
				uni.navigateTo({
					url: "/pages/user/address_list/address_list?operate=selectAdress"
				})
			},
			/*选发票*/
			showInvoice(e){
				this.invoiceFlag=true;
				let cdx=e.currentTarget.dataset.idx
				let coupons=this.orderList[cdx].usable_coupons;
				let url="/pages/cart/invoice/invoice"
				uni.navigateTo({
					url:url
				})
			},
			//选择优惠劵
			useCoupon(e){
				console.log(e)
				let cdx=e.currentTarget.dataset.idx
				let coupons=this.storeList[cdx].usable_coupons;
				// this.coupons=coupons;
				let url="/pages/user/checkcoupon/checkcoupon";
				let couponidArr=[];
				console.log(this.params.order_use_coupon_ids)
				if(this.params.order_use_coupon_ids.length>0){
					couponidArr=this.params.order_use_coupon_ids.split(",")
				}
				
				let couponid=couponidArr[cdx]
				console.log(couponidArr)
				
				uni.setStorageSync("couponInfo",{
					coupon:coupons,
					use_couponId:couponid
				});
				
				
				uni.navigateTo({
					url:url
				})
				
				
			},
			//备注
			keyUpChangeNum(e){
				console.log(e)
				let cdx=e.currentTarget.dataset.idx
				let note=e.detail.value;
				let user_notes="";
				let storeList=this.storeList;
				for(var i=0;i<storeList.length;i++){
					var s=storeList[i]
					
					if(cdx==i){
						s.user_notes=note
						this.params.user_notes=note
					}
					// this._getCartOrder(this.params)
					// user_notes[s.store_id]=note+s.store_id
					console.log(storeList)
				}
				
			},
			/*用户信息*/ 
			getUserInfo(){
				getUserInfo().then(res=>{
					console.log(res)
					if(res){
						this.userInfo=res
					}
					
				})
			},
			/*支付密码*/
			paypoints(e){
				console.log(e)
				let pwd=e.detail.value
				this.paypwd=pwd;
			},
			/*可用积分*/
			usePoints(e){
				if(this.select==false){
					this.params.integral=this.userInfo.pay_points
					this.payModel=true;
					this._getCartOrder(this.params)
				}else{
					this.params.integral=0;
					this.payModel=false;
					this._getCartOrder(this.params)
				}
				this.select=!this.select;
			},
			//优惠劵码
			couponsShow(){
				this.show1=true;
			},
			//关闭优惠劵码
			close_coupons(){
				this.show1=false;
			},
			//输入优惠劵码
			inputCouponCode(e){
				console.log(e)
				this.couponCode=e.detail.value
			},
			
			//确认领取优惠劵码
			addCouponCode(){
				let params={
					code:this.couponCode
				}
				this.postCoupon(params)
			},
			postCoupon(params){
				postCoupon(params).then(res=>{
					console.log(res)
					if(res.msg=="优惠券兑换码无效"){
						common.toast("none","优惠券兑换码无效",2000)
						return false;
					}
					if(res.status==1){
						common.toast("none","领取成功",2000)
						return false;
					}
					
				})
			},
			
			/*提交订单*/
			submitForm(){
				var limit_num;
				this.orderList.map(item=>{
					item.order_goods.map(item2=>{
						console.log(item2.limit_num)
						if(item2.limit_num==0){
							limit_num=0;
							
						}
					})
				})
				/*订单商品中库存不能为0*/ 
				if(limit_num==0){
					common.toast("none","订单中有商品库存为0!",3000)
					return;
				}
				
				var user_notes={}
				// console.log(this.storeList)
				this.storeList.forEach((i,index)=>{
					user_notes[i.store_id]=i.user_notes
				
				})
				this.params.user_notes=user_notes
				
				
				
				let storeData={
					id:this.params.goods_id,
					num:this.params.goods_num,
					itemId:this.params.item_id,
					
				}
				let params={
						//立即购买需要传good_id
					"address_id":this.params.address_id,
					"order_use_coupon_ids":this.params.order_use_coupon_ids, //优惠劵id
					"integral":this.params.integral,//使用积分
					"user_notes":this.params.user_notes,//备注
					
				} 
				if(this.paypwd!=null){
					let pwd=this.paypwd;
					let password=Md("TPSHOP"+pwd)
					params.pay_pwd=password //积分支付密码
				}
				
				
				this.postCartOrder(params,storeData)
				// return true;
				
				
			},
			postCartOrder(params,storeData){
				postCartOrder(params,storeData).then(res=>{
					console.log(res)
					
					if(res.status==1){
						uni.redirectTo({
							url:`/pages/cart/cart4/cart4?order=${res.result.master_order_sn}`
						})
					}
					// console.log(res)
				})
			},
		},
		
	}
</script>

<style lang="scss">
	/* cart2.wxss */
	.container {
		padding-bottom: 100rpx;
		border-top: 2rpx solid #f3f3f3;
		overflow-x: hidden;
	}

	.user-mes {
		position: relative;
		background-color: #fff;
		font-size: 32rpx;
		color: #333;
		padding-top: 24rpx;
	}

	.user-contact {
		padding: 0 60rpx 24rpx 30rpx;
		color: #333333;
		font-size: 30rpx;
		font-weight: 500;
	}

	.location {
		position: relative;
		padding: 0 60rpx 26rpx 30rpx;
	}

	.location .address {
		color: #999999;
		font-size: 26rpx;
		line-height: 40rpx;
		height: 40rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.pos-icon {
		position: absolute;
		left: 28rpx;
		top: 4rpx;
		width: 23rpx;
		height: 29rpx;
	}

	.border-img {
		width: 100%;
		height: 8rpx;
		font-size: 0;
	}

	.update-logistics {
		position: absolute;
		right: 30rpx;
		top: 40rpx;
		width: 18rpx;
		height: 18rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		border-top: 3rpx solid #B9B9B9;
		border-right: 3rpx solid #B9B9B9;
		transform: rotate(45deg);
	}

	.update-logistics .arrow-rigth {
		top: 0;
	}

	.order-meg {
		font-size: 28rpx;
		margin-top: 10rpx;
	}

	.order-detail {
		padding: 25rpx 0;
		color: #999;
		height: 180rpx;
		position: relative;
		background: #ffffff;
	}

	.goods-img {
		float: left;
		width: 180rpx;
		height: 180rpx;
		margin: 0 30rpx 0 25rpx;
	}

	.order-cont {
		float: left;
		width: 490rpx;
	}

	.goods-name {
		overflow: hidden;
		margin-bottom: 10rpx;
		color: #1d1d1d;
		font-size: 26rpx;
		-webkit-line-clamp: 1;
	}

	.goods-color {
		font-size: 22rpx;
	}

	.information1 {
		font-size: 22rpx;
		color: #f48a00;
		position: absolute;
		left: 230rpx;
		bottom: 70rpx;
	}

	.order-num {
		position: absolute;
		left: 230rpx;
		bottom: 0;
		width: 484rpx;
		font-size: 30rpx;
		font-weight: 600;
		color: #ff3b3b;
		padding-bottom: 24rpx;
	}

	.order-num .goods_price {
		font-size: 22rpx;
	}

	.order-num .goods_num {
		float: right;
		color: #333333;
		font-size: 30rpx;
		font-weight: 500;
	}

	.order-num .goods_num text {
		font-size: 26rpx;
	}

	.distribution {
		width: 750rpx;
		height: 86rpx;
		line-height: 86rpx;
		color: #666;
		font-size: 30rpx;
		padding-left: 25rpx;
		background-color: #ffffff;
		border-bottom: 1px solid #f3f3f3;
		margin-top: 10rpx;
	}

	.set-mes {
		background-color: #fff;
		padding: 0 25rpx;
		font-size: 26rpx;
		color: #262626;
	}

	.selfsubmit {
		width: 100%;
		height: auto !important;
		padding-top: 16rpx;
	}

	.set-mes>view {
		display: flex;
		align-items: center;
		height: 106rpx;
		position: relative;
	}

	.use-item .jf {
		color: #666;
		font-size: 26rpx;
		float: right;
		position: absolute;
		right: 85rpx;

	}

	.set-item {
		justify-content: space-between;
		font-size: 26rpx;
		position: relative;
		padding-right: 40rpx;
	}

	.use-item.set-item {
		padding-right: 0;
	}

	.store-list .set-item .set-btn {
		width: auto;
	}

	.invoice {
		padding-right: 0
	}

	.set-btn {
		display: flex;
		font-size: 24rpx;
		width: 110rpx;
	}

	.set-mes input {
		width: 380rpx;
		height: 50rpx;
		line-height: 50rpx;
		border: 1px solid #f3f3f3;
	}

	.line {
		border-bottom: 2rpx solid #f3f3f3;
	}

	.show1 {
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, .7);
		position: fixed;
		top: 0;
		bottom: 0;
		z-index: 999;
	}

	.show1>view {
		position: fixed;
		width: 750rpx;
		height: 765rpx;
		padding-top: 35rpx;
		bottom: 0;
		background: #fff;
		z-index: 9;
	}

	.show1 .use {
		color: #1f1f1f;
		text-align: center;
		font-size: 30rpx;
	}

	.show1 .use view {
		color: #999;
		font-size: 15px;
		float: right;
		margin-right: 30rpx;
	}

	.show1 .use image {
		width: 22rpx;
		height: 22rpx;
	}

	.show1 button {
		width: 690rpx;
		height: 66rpx;
		line-height: 66rpx;
		color: #fff;
		margin-left: 30rpx;
		font-size: 26rpx;
		background-color: #ff3b3b;
		text-align: center;
		border-radius: 50rpx;
		position: absolute;
		bottom: 106rpx;
	}

	.show1 input {
		width: 606rpx;
		height: 80rpx;
		margin-top: 28rpx;
		border: 1px solid #f3f3f3;
		border-radius: 50rpx;
		padding: 0 20px;
	}

	.use-btn {
		width: 40rpx;
		height: 40rpx;
		border-radius: 50%;
		margin-left: 20rpx;
		line-height: 50rpx;
		text-align: center;
		border: 1px solid #f3f3f3;
		color: #fff;
	}

	.coupon-num {
		height: 36rpx;
		margin-left: 20rpx;
		padding: 0 16rpx;
		line-height: 36rpx;
		text-align: center;
		background-color: #ff3b3b;
		color: #fff;
		font-size: 24rpx;
	}

	.set-item .word-box {
		position: absolute;
		left: 80rpx;
		top: 40rpx;
		text-align: right;
		z-index: 1;
	}

	.word-box {
		width: 620rpx;
		height: 40rpx;
		line-height: 40rpx;
	}

	.information {
		padding: 10rpx 25rpx 20rpx;
		background-color: #fff;
		margin-top: 10rpx;
	}

	.information .item {
		display: flex;
		justify-content: space-between;
		height: 60rpx;
		line-height: 60rpx;
		font-size: 26rpx;
		color: #202020;
	}

	.information .item .co-red {
		color: ff2c2c;
		font-weight: 600;
	}

	.btn-wrap {
		height: 98rpx;
		background-color: #fff;
		border-top: solid 1px #f3f3f3;
		position: fixed;
		bottom: 0;
		width: 100%;
		z-index: 100;
	}

	.remark {
		display: block;
	}

	.btn-wrap .num {
		color: #252525;
		font-size: 26rpx;
		float: left;
		padding-left: 25rpx;
		display: flex;
		align-items: center;
		height: 98rpx;
	}

	.tips-btn {
		float: right;
		width: 215rpx;
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 30rpx;
		background-color: #ff4949;
		color: #f7f8f8;
	}

	.pay-amount {
		float: right;
		display: flex;
		align-items: center;
		height: 100rpx;
		font-size: 30rpx;
		margin-right: 40rpx;
	}

	.pay-amount .co-red {
		font-weight: 600;
		color: #ff3b3b;
	}

	.payable {
		color: #1e1e1e;
	}

	/* 物流列表弹框 */
	.shipping-modal {
		z-index: 20;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		overflow-y: hidden;
		color: #666666;
		background-color: white;
	}

	.shipping-nav {
		text-align: center;
		font-size: 35rpx;
		padding-top: 30rpx;
	}

	.shipping-list {
		padding: 20rpx 30rpx 40rpx;
		font-size: 28rpx;
	}

	.shipping-item {
		display: block;
		padding: 20rpx 0;
	}

	.shipping-btn {
		width: 100%;
		color: white;
		background-color: #ff3b3b;
		line-height: 90rpx;
		text-align: center;
		font-size: 40rpx;
	}

	.store-list {
		margin-bottom: 10rpx;
	}

	.store-mes {
		height: 34rpx;
		padding: 33rpx 20rpx;
		display: flex;
	}

	.coupon {
		display: flex;
	}

	.totle-weight {
		padding-right: 20rpx;
		height: 88rpx;
		line-height: 88rpx;
		text-align: right;
	}

	.invoice-wrap {
		margin-top: 20rpx;
		margin-bottom: 0rpx;
	}

	.store-ico {
		height: 34rpx;
		width: 34rpx;
		margin-right: 20rpx;
	}

	switch .wx-switch-input {
		height: 42rpx;
		border-radius: 4rpx;
	}

	switch .wx-switch-input::before,
	switch .wx-switch-input::after {
		height: 40rpx;
		border-radius: 4rpx;
	}



	.selfsubmit radio {
		float: right;
		transform: scale(0.85);
	}

	.selfsubmit-view {
		margin-top: 20rpx;
		padding-bottom: 30rpx;
		margin-bottom: 10rpx;
		font-size: 24rpx;
		color: #999;
	}

	.selfsubmit-view text {
		color: #999;
	}

	.radio-group {
		width: 100%;
		font-size: 26rpx;
		color: #262626;
	}

	.arrow-rigth {
		width: 14rpx;
		height: 25rpx;
		position: absolute;
		right: 0;
		top: 42rpx;
	}

	// .use-points {
	// 	width: 48rpx;
	// 	position: absolute;
	// 	right: 0;
	// }
	.use-points{
		position: absolute;
			right: 0;
		    width: 40rpx;
		    height: 40rpx;
		    display: block;
	}


	/** 日期插件s */

	.kouviewList {
		background-color: #F7F7F7;
	}

	.kouview {
		height: 170px;
		margin-top: 5px;

	}

	.kouviews {
		height: 150px;
		margin-top: 5px;

	}

	.time-title {
		float: left;
		width: 20%;
		text-align: center;
		color: #45BCE8
	}

	.picker-text {
		text-align: center;
	}

	/** 日期插件e */
	/* 优惠券码弹窗 */
	.coupons .input {
		color: #333333;
		font-size: 26rpx;
		margin-left: 30rpx;
		margin-top: 95rpx;
	}

	.store_name {
		height: 82rpx;
		border-bottom: 1rpx solid #f3f3f3;
		padding: 0 20rpx;
		line-height: 82rpx;
		background: #fff;
		color: #666;
	}

	.store_name image {
		width: 32rpx;
		height: 32rpx;
		transform: translate(0, 6rpx);
		margin-right: 5rpx;
	}
</style>
